package com.jubao.ejb.dao;

import java.io.Serializable;
import java.util.List;

import com.jubao.ejb.entity.Category;

public interface CategoryDao extends Serializable {

	/**
	 * save category 
	 * 
	 * @param category
	 * @return
	 */
	public Category save(Category category);

	/**
	 * find category
	 * 
	 * @param categoryId
	 * @return
	 */
	public Category find(String categoryId);

	/**
	 * find category 
	 * 
	 * @param categorySysId
	 * @return
	 */
	public Category find(long categorySysId);

	/**
	 * get primary category trail
	 * 
	 * @param categorySysId
	 * @return 
	 */
	public List<Category> getPrimaryCategoryTrail(long categorySysId);

	/**
	 * get primary category trail
	 * 
	 * @param categoryId
	 * @return
	 */
	public List<Category> getPrimaryCategoryTrail(String categoryId);

	/**
	 * Get child categories of category identified by parentCategoryId
	 * 
	 * @param parentCategoryId
	 * @param pgno
	 * @param pgsize
	 * @param orderBy
	 * @return
	 */
	public List<Category> getChildCategoryList(String parentCategoryId, int pgno, int pgsize, String orderBy);
	/**
	 * Get count of child categories of category identified by parentCategoryId
	 * 
	 * @param parentCategoryId
	 * @return
	 */
	public long getChildCategoryCount(String parentCategoryId);
	/**
	 * Get child categories of category identified by parentSysId
	 * 
	 * @param parentCategoryId
	 * @param pgno
	 * @param pgsize
	 * @param orderBy
	 * @return
	 */
	public List<Category> getChildCategoryList(long parentCategorySysId, int pgno, int pgsize, String orderBy);
	/**
	 * Get count of child categories of category identified by parentCategorySysId
	 * 
	 * @param parentCategorySysId
	 * @return
	 */
	public long getChildCategoryCount(long parentCategorySysId);

}
